<?php

class Application_Form_Login extends Zend_Form
{

    public function init()
    {
                
        $username = new Zend_Form_Element_Text('username');
        $username->setLabel('Username')
                 ->setRequired(true)
                 ->setAttrib('size', 20);
                
        $password = new Zend_Form_Element_Password('password');
        $password->setLabel('Password')
                 ->setRequired(true)
                 ->setAttrib('size', 20);
                               
        $login = new Zend_Form_Element_Submit('login');
        $login->setLabel('Login')
                ->setIgnore(true);
        
       	$remember = new Zend_Form_Element_Checkbox('remember');
       	$remember->setLabel('Keep me logged in');
       	
       	$this->addElements(array(
                        $username,
                        $password,
                        $login,
                        $remember
                        ));   

                     
					
        $this->setElementDecorators(array(
        					'ViewHelper',
        					//'Errors',
        					'Label',
        					array(array('row'=>'HtmlTag'), array('tag'=>'div', 'class'=>'input'))
        ));

        
        $login->setDecorators(array('ViewHelper',
        							array(array('row'=>'HtmlTag'), array('tag'=>'div', 'class'=>'submit'))
        						));
        					
        $this->setAttrib('id', 'login-form');
		$this->setDecorators(array(
						'FormElements',
						'Form'
						));
		
		
    }


}

